@for $i from 1 to 3 {
    .box#{$i} {
        width: 100px;
    }
}

@for $i from 5 through 7 {
    .box#{$i} {
        width: 100px;
    }
}